﻿// Decompiled with JetBrains decompiler
// Type: MCM.Abstractions.Base.PerCampaign.PerCampaignSettings`1
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

#nullable enable
namespace MCM.Abstractions.Base.PerCampaign
{
  public abstract class PerCampaignSettings<T> : PerCampaignSettings where T : PerCampaignSettings, new()
  {
    public static T? Instance
    {
      get
      {
        if (!PerCampaignSettings.Cache.ContainsKey(typeof (T)))
          PerCampaignSettings.Cache.TryAdd(typeof (T), new T().Id);
        return BaseSettingsProvider.Instance?.GetSettings(PerCampaignSettings.Cache[typeof (T)]) as T;
      }
    }
  }
}
